package com.csxy.six.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Data
@TableName("user")
public class User {
    private Long id;
    private String username;
    private String password;
    private String nickname;
    private String email;
    private String phone;
    private String avatar;
    private Integer status; // 0:禁用 1:正常 2:锁定
    private LocalDateTime createTime;
    private LocalDateTime updateTime;

    // 新增字段
    private String bio; // 个人简介
    private String gender; // 性别
    private String location; // 所在地

    @TableField(exist = false)
    private List<Role> roles; // 用户角色列表


    // 以下是需要添加的 getter 和 setter（虽然 @Data 注解会生成，但显式添加可避免 IDE 警告）
    public String getBio() {
        return bio;
    }

    public void setBio(String bio) {
        this.bio = bio;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }
}